package name.sakanacatcher.service;

import name.sakanacatcher.entity.Role;
import name.sakanacatcher.entity.User;
import name.sakanacatcher.repository.ComRepository;
import name.sakanacatcher.repository.RoleRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoleService {
    @Autowired
    RoleRepository roleRepository;


    @Autowired
    ComRepository comRepository;

    public RoleRepository getRoleRepository() {
        return roleRepository;
    }

    public List<Role> getAllRoles(){
        return roleRepository.findAll();
    }

    public Role getHRRole(){ return roleRepository.getRoleById(2); }
    public Role getAdminRole(){ return roleRepository.getRoleById(1);}
    public Role getHunterRole(){ return roleRepository.getRoleById(5);}
    public Role getComPrincipalRole(){ return roleRepository.getRoleById(3);}

}
